package rush.edu.wechat.common.service.db;

/**
 * DESC: S基础数据库配置，所有数据库配置需要继承此类
 * USER:hmily
 * DATE:2017/11/5
 * TIME:14:51
 */
public abstract class BaseDB implements DbConfig{
    private String url;
    private String username;
    private String password;
    private String driverClass;
    private String dialectType = "mysql";
    private String dbType = "mysql";
    private String mapperLocation ;

    /**
     * AUTO->`0`("数据库ID自增")
     * INPUT->`1`(用户输入ID")
     * ID_WORKER->`2`("全局唯一ID")
     * UUID->`3`("全局唯一ID")
     */
    private Integer idType = 3;

    private Boolean columnUnderline;


    public String getDialectType() {
        return dialectType;
    }

    public void setDialectType(String dialectType) {
        this.dialectType = dialectType;
    }

    public String getDbType() {
        return dbType;
    }

    public void setDbType(String dbType) {
        this.dbType = dbType;
    }

    public Integer getIdType() {
        return idType;
    }

    public void setIdType(Integer idType) {
        this.idType = idType;
    }

    public String getDriverClass() {
        return driverClass;
    }

    public void setDriverClass(String driverClass) {
        this.driverClass = driverClass;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }


    @Override
    public String getMapperLocation() {
        return mapperLocation;
    }

    public BaseDB setMapperLocation(String mapperLocation) {
        this.mapperLocation = mapperLocation;
        return this;
    }

    @Override
    public Boolean getColumnUnderline() {
        return columnUnderline;
    }

    public BaseDB setColumnUnderline(Boolean columnUnderline) {
        this.columnUnderline = columnUnderline;
        return this;
    }
}
